package common_config

// Logger bootstrap.yml 对应结构体
type Logger struct {
	Path string `json:"path"`
}

// Nacos bootstrap.yml 对应结构体
type Nacos struct {
	Addr                string `yaml:"addr"`
	Namespace           string `yaml:"namespace"`
	Username            string `yaml:"username"`
	Password            string `yaml:"password"`
	AppName             string `yaml:"app-name"`
	DataIds             string `yaml:"data-ids"`
	Cluster             string `yaml:"cluster"`
	AvailabilityCluster string `yaml:"availability-cluster"`
}

// BoostrapConfig bootstrap.yml 对应结构体
type BoostrapConfig struct {
	HttpPort        string
	Logger          Logger `yaml:"logger"`
	Nacos           Nacos  `yaml:"nacos"`
	ConfigSecretKey string `yaml:"config-secret-key"`
}

// AppEnv 标记当前服务进程的运行环境
var AppEnv = &struct {
	Env string `yaml:"app-env"`
}{
	Env: "DEV",
}

// AppSign 配置文件 - 所有服务的签名配置(在微服务间通讯时验签)
var AppSign = &struct {
	Sign map[string]string `yaml:"sign"`
}{
	Sign: make(map[string]string),
}

// PriorityNetwork 优先网卡选择配置
var PriorityNetwork = &struct {
	Networks []string `yaml:"priority-network"`
}{
	Networks: make([]string, 0),
}
